<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        background-color: #eee;
      }
      .big-box {
        width: 200px;
        height: 200px;
        /* background-color: #000; */
        background: linear-gradient(black 50%, white 50%);
        border-radius: 100px;
        display: flex;
        align-items: center;
        margin: 0 auto;
      }
      .left,
      .right {
        width: 50%;
        height: 50%;
        border-radius: 50%;
      }
      .left {
        background-color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .right {
        background-color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .small {
        width: 25px;
        height: 25px;
        border-radius: 50%;
      }
      .left .small {
        background-color: #000;
      }
      .right .small {
        background-color: #fff;
      }
      @keyframes move {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }
      .big-box {
        animation: move 2s linear infinite;
      }
    </style>
  </head>
  <body>
    <div class="big-box" onclick="moveclick()">
      <div class="left">
        <div class="small"></div>
      </div>
      <div class="right">
        <div class="small"></div>
      </div>
    </div>
  </body>
  <script>
    // let box = document.querySelector("big-box");
    // function moveclick() {
    //   console.log(123);
    //   // box.classList.add("move");
    //   box.className = "move";
    //   //   box.style.animation = "move 2s linear infinite";
    // }
  </script>
</html>
